# -*- coding: utf-8 -*-
#
# @Time    ： 2023/2/16  16:43
# @Auther  ： 徐良
# File     :  custDateParts.py

from PySide6 import QtWidgets
from PySide6.QtWidgets import QDateEdit, QTimeEdit, QDateTimeEdit
from PySide6.QtCore import Qt, QDate


# region 日期控件

class BaseDateEdit(QDateEdit):

    def __init__(self, parent=None):
        super().__init__(parent)


class DateEdit(BaseDateEdit):

    def __init__(self, parent=None):
        super().__init__(parent)
        self.setCalendarPopup(True)

# endregion


# region 日期时间控件
class BaseDateTimeEdit(QDateTimeEdit):

    def __init__(self, parent=None):
        super().__init__(parent)


class DateTimeEdit(BaseDateTimeEdit):

    def __init__(self, parent=None):
        super().__init__(parent)

# endregion


# region 时间控件
class BaseTimeEdit(QTimeEdit):
    """
    自定义日期控件基础
    """

    def __init__(self, parent=None):
        super().__init__(parent)



class TimeEdit(BaseTimeEdit):

    def __init__(self, parent=None):
        super().__init__(parent)
        self.setDisplayFormat("hh:mm")

# endregion